!-------------------------------------------------------------LICENSE--------------------------------------------------------------!
!                                                                                                                                  !
!The MAP code is written in Fortran language for magnetohydrodynamics (MHD) calculation with the adaptive mesh refinement (AMR)    !
!and Message Passing Interface (MPI) parallelization.                                                                              !
!                                                                                                                                  !
!Copyright (C) 2012                                                                                                                !
!Ronglin Jiang                                                                                                                     !
!rljiang@ssc.net.cn                                                                                                                !
!585 Guoshoujing Road. Pudong, Shanghai, P.R.C. 201203                                                                             !
!                                                                                                                                  !
!This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License         !
!as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.             !
!                                                                                                                                  !
!This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of    !
!MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.                        !
!                                                                                                                                  !
!You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software     !
!Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.                                                   !
!                                                                                                                                  !
!-------------------------------------------------------------LICENSE--------------------------------------------------------------!

module parameters

   implicit none
   
!----------------------------------------------------------------------------------------------------------------------------------|
   integer(4), parameter :: unit_datamap = 9
   integer(4), parameter :: unit_par = 10
   integer(4), parameter :: unit_in = 11
   integer(4), parameter :: unit_ro = 12
   integer(4), parameter :: unit_mx = 13
   integer(4), parameter :: unit_my = 14
   integer(4), parameter :: unit_mz = 15
   integer(4), parameter :: unit_bx = 16
   integer(4), parameter :: unit_by = 17
   integer(4), parameter :: unit_bz = 18
   integer(4), parameter :: unit_en = 19
   integer(4), parameter :: unit_nt = 20
   integer(4), parameter :: unit_x = 21
   integer(4), parameter :: unit_t = 22
   integer(4), parameter :: unit_block = 23
   integer(4), parameter :: unit_datamap_manage_module = 42

   integer(4), save :: scheme
   integer(4), save :: sys
   integer(4), save :: ng
   integer(4), save :: nx_no_bnd
   integer(4), save :: nx_block
   integer(4), save :: ini_blocks
   integer(4), save :: nx_total
   integer(4), save :: ratio
   integer(4), save :: n_levels
   integer(4), save :: n_neighs
   integer(4), save :: n_blocks
   integer(4), save :: output_real8_flag
   integer(4), save :: riemann_solver_flag

   real(8), save :: cfl
   real(8), save :: t_end
   real(8), save :: dt_output
   real(8), save :: eps
   real(8), save :: gm
   real(8), save :: gmm1
   real(8), save :: pi
   real(8), save :: rangex
   real(8), save :: thr_al
   real(8), save :: thr_de
   real(8), save :: thr_ex
   real(8), save :: thr_fl
   real(8), save :: zero_posx

   character(128), save :: directory = ''
   character(128), save :: parameters_filename = 'parameters'
   character(128), save :: datamap_path = ''

   integer(4), save :: id_index = 0
   integer(4), save :: max_level = 1
   integer(4), save :: nt = 0
   real(8), save :: base_dt = 0.0d0
   real(8), save :: min_dt = 0.0d0
   real(8), save :: max_speed = 0.0d0
   real(8), save :: len_regrid = 1.0d30
   real(8), save :: t_regrid = -1.0d0

   real(8), dimension(:), allocatable, save :: thr_va0

!----------------------------------------------------------------------------------------------------------------------------------|

end module parameters

